<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="../fonts/element-icons.ttf">
    <link rel="stylesheet" href="../fonts/element-icons.woff">
    <link rel="stylesheet" href="../css/ele.css">
    <script src="../js/vue.js"></script>
    <script src="../js/axios.min.js"></script>
    <script src="../js/url.js"></script>
    <!-- <script src="../node_modules/element-ui/lib/index.js"></script> -->
    <script src="../js/ele.js"></script>
    <link rel="stylesheet" href="../css/public.css">
    <link rel="stylesheet" href="../css/qqyxk.css">
    <script src="../js/Mixin.js"></script>
    <script src="../js/crypto-js.min.js"></script>
    <script src="../js/aes.js"></script>
</head>

<body>
    <div id="app" style="background-color: #fff;">
        <!-- 头部 -->
        <header>
            <div class="heart ng-scope" ng-controller="HeartForm">
                <div class="logo" @click="goHome">
                    <img src="../image/index/logo.png" alt="" style="width: 123px;height: 59px;margin-top: 8px;">
                    <div style="width: 1px;
                    height: 24px;
                    background: #333333;
                    margin-top: 7%;
                    margin-right: 9px;"></div>
                    <div>留学大数据，智能选校专家</div>
                </div>
                <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="menuSelect">
                    <el-submenu index="1">
                        <template slot="title">产品</template>
                        <div class="chanpin">
                            <ul class="unav">
                                <li :class="[activenavliIndex==0?'activenavli':'']" @click="unavclcik(0)">全球院校库</li>
                                <li :class="[activenavliIndex==1?'activenavli':'']" @click="unavclcik(1)">智能选校系统</li>
                            </ul>
                            <div style="margin-left: 53px;" v-if="activenavliIndex==0">
                                <div class="ltitle"> <img src="../image/index/quanqiu.png" alt=""
                                        style="width: 26px;vertical-align: bottom;">
                                    全球院校库</div>
                                <div class="lcontent">
                                    <!-- <div> -->
                                    <ul v-for="(item,index) in headerList" :key="index">
                                        <li>{{item.name}}</li>
                                        <li v-for="i in item.universityItems" @click="qqyxkClick(item.id,i.id)">
                                            {{i.name}}院校库
                                        </li>
                                    </ul>
                                </div>
                            </div>
                            <div style="margin-left: 53px;" v-if="activenavliIndex==1">
                                <div class="ltitle"> <img src="../image/index/quanqiu.png" alt=""
                                        style="width: 26px;vertical-align: bottom;">
                                    智能选校系统</div>
                                <div class="lcontent">
                                    <div>
                                        <ul>
                                            <li v-for="(i,index) in znxxxtList" :key="index" style="font-size: 12px;"
                                                @click="znxxxtSearch(i)">
                                                {{i.name}}</li>

                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </el-submenu>
                    <el-menu-item index="2">会员</el-menu-item>
                    <el-menu-item index="3">套餐</a></el-menu-item>
                    <el-menu-item index="4">合作</a></el-menu-item>

                </el-menu>
                <div class="user_box" id="user_box">
                    <div v-if="isLogin">
                        <el-dropdown trigger="click">
                            <span class="el-dropdown-link">
                                <img :src="HeadImageUrl" alt=""
                                    style="width: 33px;height: 33px; vertical-align: middle;margin-right: 8px;">
                                {{nickname}}<i class="el-icon-arrow-down el-icon--right"></i>
                            </span>
                            <el-dropdown-menu slot="dropdown">
                                <el-dropdown-item icon="el-icon-user" @click.native="goUser">个人中心</el-dropdown-item>
                                <el-dropdown-item icon="el-icon-layout"
                                    @click.native="layoutLogin">退出登录</el-dropdown-item>
                            </el-dropdown-menu>
                        </el-dropdown>
                    </div>
                    <div v-else @click="login"><img src="../image/index/user.png" alt=""
                            style="width: 22px;vertical-align: middle;"> <a href="./login.html">登录</a>/ <a
                            href="./register.html">注册</a> </div>
                </div>
            </div>
        </header>
        <!-- content height: calc(100vh - 114px);
        overflow-y: scroll;-->
        <div class="content">
            <div class="select" style="padding: 0 20px;">
                <div style="display: inline-block;" class="select0"> <el-select ref="selectModel0" v-model="yuanxiao[0]"
                        placeholder="请选择" @change="yuanxiao0Change">
                        <el-option v-for="item in headerList" :key="item.id" :label="item.name" :value="item.id">
                        </el-option>
                    </el-select>
                </div>
                <div style="display: inline-block;" class="select1">
                    <el-select v-model="yuanxiao[1]" placeholder="请选择" @change="yuanxiao1Change" ref="selectModel1">
                        <el-option v-for="item in universityItems" :key="item.id" :label="item.name" :value="item.id">
                        </el-option>
                    </el-select>
                </div>
                <!-- <el-cascader ref="cascaderArr" v-model="yuanxiao" :options="headerList" @change="handleChangeYxk"
                    :show-all-levels="false"
                    :props="{ label: 'name',value:'id',children:'universityItems'}"></el-cascader> -->
            </div>

        </div>
        <img src="../image/znxxxt/err.png" alt="" style="width: 100%;">

        <!-- footer -->
        <footer>2023-2024 非攻留学大数据 版权所有 feigongdata.com 浙ICP备2024101258号-1</footer>
    </div>

</body>
<script>
    var app = new Vue({
        mixins: [myMixin],
        el: "#app",
        data() {
            return {
                yuanxiao: [], yuanxiao0Index: 0, universityItems: [],
            }
        },
        created() {

        },
        mounted() {
            if (new URL(document.URL).searchParams.get("id")) {
                this.yuanxiao = JSON.parse(new URL(document.URL).searchParams.get("id"))
                setTimeout(() => {
                    if (this.headerList.length) {
                        this.yuanxiao0Index = this.headerList.findIndex(i => i.id == this.yuanxiao[0])
                        console.log('this.yuanxiao0Index', this.yuanxiao0Index);
                        this.universityItems = this.headerList[this.yuanxiao0Index].universityItems
                        console.log('this.universityItems', this.universityItems);
                    }
                }, 1000)
            }
        },
        methods: {
            yuanxiao0Change(e) {
                this.$refs.selectModel0.focus()
                this.yuanxiao[0] = e
                this.yuanxiao0Index = this.headerList.findIndex(i => i.id == this.yuanxiao[0])
                this.universityItems = this.headerList[this.yuanxiao0Index].universityItems
                this.$nextTick(() => {
                    this.$refs.selectModel1.toggleMenu();
                    // this.$set(this.yuanxiao, 0, this.universityItems[0]);
                    // this.yuanxiao.splice(1, 1, this.universityItems[0].id)
                })
            },
            yuanxiao1Change(e) {
                console.log(1111111, this.yuanxiao);
                this.yuanxiao[1] = e
                this.qqyxkClick(this.yuanxiao[0], this.yuanxiao[1],)
            },
        }
    })
</script>
<style>
    .el-cascader .el-input .el-input__inner {
        border: 0;
    }
</style>

</html>